from wowhead.wowheadRequest import Request as WowheadRequest
from wowhead.Item import Item

class WowheadAPI():
	"""wowhead.com Python API"""
	
	def __init__(self,language="EN"):
		if language=="en" or language=="EN":
			language="www"
		self.language=language
		
	def getItem(self,item_id):
		"""Get an item from wowhead using the id"""
		request_item = WowheadRequest(self.language).getItem(item_id=item_id)
		return Item(request_item)